<?php
class AppController extends Controller{
	var $components = array('Acl', 'Auth', 'Session', 'Cakemenu.Cakemenu');
	var $helpers = array('Html', 'Form', 'Session', 'Cakemenu.Cakemenu');

	function beforeFilter(){
		
		$this->set('menu', $this->Cakemenu->nodes());
		//Configure AuthComponent
		$this->Auth->userModel = 'UnionMember';
		$this->Auth->fields = array('username' => 'id', 'password' => 'password');
		$this->Auth->authorize = 'actions';
		$this->Auth->loginAction = array('controller'=>'UnionMembers', 'action' => 'login');
		$this->Auth->logoutRedirect = array('controller'=>'UnionMembers', 'action' => 'login');
		$this->Auth->loginRedirect = array('controller'=>'UnionMembers', 'action' => 'index');			
	}

}